#include "Config.h"
#include "Define.h"
#include "PublicFunction.h"
#include "json/json.h"
//#include "fsoperation.h"

namespace gitstore {
std::shared_ptr<CGlobalConfig> CGlobalConfig::_config = std::shared_ptr<CGlobalConfig>(new CGlobalConfig());

CGlobalConfig::CGlobalConfig()
{
    std::string content;
    readFile(CONFIG_PATH, content);
    Json::Reader reader;
    reader.parse(content, _config_content);
}

CGlobalConfig::~CGlobalConfig()
{

}


std::shared_ptr<CGlobalConfig> CGlobalConfig::getInstance() {
    return _config;
}

const Json::Value& CGlobalConfig::getConfigContent() const {
    return _config_content;
}

//std::shared_ptr<CMetaDataOperation> CGlobalConfig::getFsOperation() {
//    return _fs_op;
//}

}
